<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@taglib prefix="s" uri="/struts-tags" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    
    <title>航班安排管理</title>
        <script type="text/javascript" src="<%=basePath%>/js/jquery-1.3.1.js"></script>
		<link rel="stylesheet" type="text/css" href="<%=basePath%>css/splitPage.css">
			<script type="text/javascript">
			$(function(){
				$("#page").change(function(){
					var page = $("#page").val();
					window.location.href="ArrangeInfo!getAllArrangeInfo?page=" + page;
				});
				$("#keyWord").focus(function() {
					$("#keyWord").val("");
				}) ;
				
			});
			</script>

  </head>
   <body bgcolor="#D6DFF7" >
      <table width="100%" border="0" align="center" cellpadding="1"
			cellspacing="0" class="" bgcolor="#DEE5FA" >
			<tr >
				<td align="center"  >
    <form name="SearchForm" action="ArrangeInfo!getFlightArrangeByKeyWord" method="post">
		<table border="0" width="100%">
		  <tr bgcolor="#799AE1" height="40"   >
		    <td>
		         <input id="keyWord" name="keyWord" type="text" value="请输入关键字" />
		         <input type="submit" value="查询" />
		    </td>
		  </tr>
		</table>
		
	</form>
        <table border="0" cellspacing="1" cellpadding="4" width="100%"
				class="tableborder" id="table3">
				<tr>
					<td colspan="11" class="header" align="center" height="50" >
						<blockquote>
							<font color="#874B46" size="4pt">安排信息</font>
						</blockquote>
					</td>
				</tr>
				<tr bgcolor="#799AE1" height="40" >
					<td align="center">
						航班名称
					</td>
					<td align="center">
						起飞时间
					</td>
					<td align="center">
						出售票数
					</td>
					
					<td align="center">
						修改
					</td>
					<td align="center">
						删除
					</td>
				</tr>
				<s:if test="pageBean.list.size == 0">
				<tr height="20" >
					<td>
						没有数据!
					</td>
				</tr>
				</s:if>
				<s:iterator value="pageBean.list">

					<tr height="25">
						<td align="center">
							<s:property value="flight.flight_name" />
						</td>
						<td align="center">
							<s:property value="startDate" />
						</td>
						<td align="center">
							<s:property value="ticketsNum" />
						</td>
						<td align="center">
							<a
								href="ArrangeInfo!getFlightArrangeInfoById?id=<s:property value="id" />">修改</a>
						</td>
						<td align="center">
							<a
								href="ArrangeInfo!deleteFlightArrangeInfoById?id=<s:property value="id" />">删除</a>
						</td>
					</tr>
				</s:iterator>
        </table>
        <tr height="25">
        	<td align="center">
<table width="100%" border="0">
	<tr>
		<td width="30%" align="left">
			共检索到
			<s:property value="pageBean.allRow" />
			条记录
		</td>
		<td align="right" id="pagelist">
		  <ul>
		  	<li>
		  		 <select name="page" id="page">
			  	<s:iterator value="pageBean.pageNumbers" status="pageNumbers">
				  	<s:iterator value="pageBean.pageNumbers[#pageNumbers.index]">
			  		<option value="<s:property/>"><s:property/></option>
				  	</s:iterator>
			  	</s:iterator>
			</select>
		  	</li>
		    <li class="pageinfo">共<s:property value="pageBean.totalPage" />页</li>
		    <li class="pageinfo">第<s:property value="pageBean.currentPage" />页</li>
		    <s:if test="%{pageBean.currentPage != pageBean.totalPage}">
				<li><a href="ArrangeInfo!getAllArrangeInfo?page=<s:property value="pageBean.totalPage"/>">尾页</a></li>
				<li><a href="ArrangeInfo!getAllArrangeInfo?page=<s:property value="%{pageBean.currentPage+1}"/>">下一页</a></li>
			</s:if>
		  	<s:if test="%{pageBean.currentPage == 1}"></s:if>
		  	<s:else>
				<li><a href="ArrangeInfo!getAllArrangeInfo?page=<s:property value="%{pageBean.currentPage-1}"/>">上一页</a></li>
				<li><a href="ArrangeInfo!getAllArrangeInfo?page=1">首页</a></li>
			</s:else>
		  </ul>
	</td>
						</tr>
				</table>
				</td>
				</tr>	
	  </body>
</html>
